package com.yct.springcloud.controller;


import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.UUID;

@RestController
@Slf4j
public class PaymentController {

    @Value("${server.port}")
    String port;

    /**
     * 根据ID查询支付数据
     *
     * @param id
     * @return
     */
    @GetMapping(value = "/payment/nacos/{id}")
    public String getPaymentById(@PathVariable("id") Long id) {
        log.info("*****根据id【" + id + "】查询支付数据。");

        return "查询成功，serverPort = 【"+ port+"】"+ UUID.randomUUID();
    }
}
